<template>
<ul class="footer">
<li @click="toIndex">
<i class="material-icons">home</i>
<p>首页</p>
</li>
<li @click="toDiscover">
<i class="material-icons">explore</i>
<p>发现</p>
</li>
<li @click="toOrderList">
<i class="material-icons">receipt_long</i>
<p>订单</p>
</li>
<li @click="toProfile">
<i class="material-icons">person</i>
<p>我的</p>
</li>
</ul>
</template>

<script>
export default{
name:'Footer',
methods:{
toIndex(){
this.$router.push({path:'/'});
},
toDiscover() {
  this.$router.push({path: '/discover'});
},
toOrderList(){
this.$router.push({path:'/orderList'});
},
toProfile() {
  this.$router.push({path: '/profile'});
}
}
}
</script>

<style>
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

.footer {
  width: 100%;
  height: 14vw;
  border-top: solid 1px #DDD;
  background-color: #fff;
  position: fixed;
  left: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.footer li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #999;
  user-select: none;
  cursor: pointer;
}

.footer li p {
  font-size: 2.8vw;
  margin-top: 0.5vw;
}

.footer li i {
  font-size: 5vw;
}

.footer li:hover {
  color: #0097FF;
}
</style>
